<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
    <style>
      /*enter->enter-active->enter-to 从无到有
      leave->leave-active->leave-to 从有到无*/
      .v-enter-active {
        animation: bounce-in 1.5s;
      }
  
      .v-leave-active {
        animation: bounce-in 1.5s reverse;
      }
  
      @keyframes bounce-in {
        0% {
          transform: scale(0);
        }
  
        50% {
          transform: scale(1.5);
        }
  
        100% {
          transform: scale(1);
        }
      }
    </style>
  </head>
  
  <body>
    <!-- 动画 单元素/组件帧动画 -->
    <div id="app">
      <button @click="show=!show">按钮</button>
      <transition>
        <p v-if="show">hello vue</p>
      </transition>
    </div>
    <script>
      var app = new Vue({
        el: '#app',
        data: {
          show: true
        }
      })
    </script>
</body>
</html>